import java.util.Comparator;

public class LengthComparator implements Comparator<Person> {
	
	@Override
	public int compare(Person p1, Person p2) {
		if(p1.toString().length() < p2.toString().length()) {
			return 1;
		} else if (p1.toString().length() > p2.toString().length()) {
			return -1;
		} else {
			return 0;
		}
	}
}
